public class Testcar {
    public static void main(String[] args) {
        Car2 a = new Car2();
        a.lun = "轮胎";
        a.chejia = "车架";
        a.dipan = "底盘";
        a.fandong = "发动机";

        Car1 b = new Car1();
        b.brand = "大众V6";
        b.pailiang = "1.4T";
        b.winght = "5kg";
        b.mali = "160匹";
        a.p = b;//安装到汽车上
        a.print();
        System.out.println("测试启动功能");
        a.start();
        System.out.println("测试停止功能");
        a.stop();
        System.out.println("测试鸣笛功能");
        a.mindi();
        b.show();


    }
}
